<template>
  <div class="pages">
      <el-pagination
      @size-change="onPageSizeChange"
      @current-change="onPageChange"
      :current-page="Number(paginationPage)"
      :page-size="Number(paginationPagesize)"
      :page-sizes="[10,20,30,40]"
      layout="total,sizes,prev, pager, next, jumper"
      :total="Number(total)"
      >
      </el-pagination>
  </div>
</template>
<script>
export default {
  name: 'PageTool',
  props: ['total', 'paginationPage', 'paginationPagesize', 'size'],
  data () {
    return {
    }
  },
  methods: {
    // 进入某一页
    onPageChange: function (pageNum) {
      this.$emit('pageChange', pageNum)
    },
    // 每页显示信息条数
    onPageSizeChange: function (pageSize) {
      this.$emit('pageSizeChange', pageSize)
    }
  }
}
</script>
<style lang='scss' scoped>
.pages {
  text-align: center;
  .el-pagination {
    padding-top: 30px;
    padding-bottom: 30px;
    ::v-deep .el-pager {
      .active{
        color: #ffb252;
      }
    }
  }
}
</style>
